<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript"
    src="http://maps.googleapis.com/maps/api/js?sensor=true">
</script>
<script type="text/javascript">

var map
var marcador

  function initialize() {
    var latlng = new google.maps.LatLng(4.5968892, -74.1151401);
    var myOptions = {
      zoom: 16,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      zoomControl: true
    };
    map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
		
		
    marcador = new google.maps.Marker( {
		position: latlng,
		map:map	
	})
  }
  
  function mostrarUbicacion(){
		navigator.geolocation.getCurrentPosition( lecturaGPS , errorGPS , {enableHighAccuracy:true} )  
  }
  
  function lecturaGPS(ubicacion){
	  
	  var miubicacion = new google.maps.LatLng(ubicacion.coords.latitude, ubicacion.coords.longitude);
	  
	  map.setCenter(miubicacion)
	  marcador.setPosition(miubicacion)
	  
  }
  
  function errorGPS(){
	  alerta(" no puedo encontrarte :(")
  }
  

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:100%; height:90%"></div>
  
   <button onClick="mostrarUbicacion()"> mostrar mi ubicacion </button>
</body>
</html>